/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Data;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author saleem
 */
@Embeddable
public class PatientvisitPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "PID")
    private double pid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "VID")
    private double vid;

    public PatientvisitPK() {
    }

    public PatientvisitPK(double pid, double vid) {
        this.pid = pid;
        this.vid = vid;
    }

    public double getPid() {
        return pid;
    }

    public void setPid(double pid) {
        this.pid = pid;
    }

    public double getVid() {
        return vid;
    }

    public void setVid(double vid) {
        this.vid = vid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) pid;
        hash += (int) vid;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PatientvisitPK)) {
            return false;
        }
        PatientvisitPK other = (PatientvisitPK) object;
        if (this.pid != other.pid) {
            return false;
        }
        if (this.vid != other.vid) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Data.PatientvisitPK[ pid=" + pid + ", vid=" + vid + " ]";
    }
    
}
